﻿namespace FFF.Test.Application.AppServices.PublicService.Token
{
    using System;
    using System.Collections.Generic;
    using System.IdentityModel.Tokens.Jwt;
    using System.IO;
    using System.Linq;
    using System.Security.Claims;
    using System.Text;
    using System.Threading.Tasks;
    using Abp.Application.Services;
    using Abp.Auditing;
    using Abp.EntityFrameworkCore;
    using Abp.Runtime.Security;
    using Microsoft.AspNetCore.Authentication.JwtBearer;
    using Microsoft.AspNetCore.Http;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.Extensions.Configuration;
    using Microsoft.IdentityModel.Tokens;
    using Newtonsoft.Json;
    using FFF.Test.DataAccess.Framework;
    using FFF.Test.Entity.FW.View;
    using FFF.Test.Util.Configuration;
    using FFF.Test.Util.Web;

    /// <summary>
    /// session的使用
    /// </summary>
    public interface ITokenAuthService : IApplicationService
    {
        /// <summary>
        /// 验证获取token
        /// </summary>
        /// <param name="model">验证输入实体对象</param>
        /// <returns>验证对象</returns>
        Task<AuthenticateResultModel> Authenticate([FromBody] AuthenticateModel model);

        /// <summary>
        /// Creates the access token.
        /// </summary>
        /// <param name="viewFwUser">The view fw user.</param>
        /// <returns>System.String.</returns>
        /// <remarks>ydm 2020-02-01</remarks>
        string CreateAccessToken(ViewFWUser viewFwUser);
    }
}